﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace Managistics.Model.Mappings
{
    public class InputSheetDetailMap : ClassMap<InputSheetDetail>
    {

        public InputSheetDetailMap()
        {
            Schema(Constants._tblSchema);
            Table(Constants._tblDetailInputSupplierDomestic);
            LazyLoad();

            CompositeId().KeyProperty(x => x.ItemId, "ITEM_ID")
                         .KeyProperty(x => x.InputSheetId, "INPUT_SHEET_D_ID");
            References(x => x.Good).Column("ITEM_ID");
            References(x => x.InputSheet).Column("INPUT_SHEET_D_ID");

            Map(x => x.Quantity).Column("QUANTITY_INPUT_D").Not.Nullable().Precision(53);
            Map(x => x.Status).Column("STATUS_ITEM_ID");
            Map(x => x.Id).Column("Id").Not.Nullable().Precision(18);
        }
    }
}
